
uniform float uTime;
uniform float uSpeed;
uniform vec3 uColor;
uniform float uPositionX;
uniform float uPositionY;
uniform float uRadio;
uniform float uRingWidth;
uniform float uShadowRadio;

varying vec3 vPosition;

void main() {
	float speed = uTime * uSpeed / 2.0 + 1.5;
	float dis = distance(vec2(uPositionX, uPositionY),vPosition.xy );
	float ring = smoothstep(-uRingWidth / 2.0 - uShadowRadio, -uRingWidth / 2.0, dis - mod(speed, uRadio)) - smoothstep(uRingWidth / 2.0, uRingWidth / 2.0 + uShadowRadio, dis - mod(speed, uRadio));
	gl_FragColor = vec4(uColor * ring, uRadio - mod(speed, uRadio));
}